<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
        <!--<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/ >-->
	<title>Document</title>
        <style>
            a:hover{
                color:#330033;
            }
            a:visited,a:link{
                color: #006666
            }
        </style>
</head>


<body>
 <?php
 
     //header("Content-Type: text/html; charset=utf8");

     $link=mysql_connect($servername='127.0.0.1', $username='root', $password="");

                            mysql_select_db("phpmysql");
                            mysql_query("set names utf8");//显示网页编码
                            //$mysqli->query("set names utf8");
                            $exec="select * from php_82";
                            $result=mysql_query($exec);
                            while($rs=mysql_fetch_object($result)){
                                $ID=$rs->ID;
                                $name=$rs->name;
                                $department=$rs->department;
                                $imgurl=$rs->imgurl;
                                $birth=$rs->birth;
                                $entry=$rs->entry;
    ?>

<form action="">
<table width="1000px" border="1px" bordercolor="black" cellspacing="0">
        <th>ID</th>
        <th>姓名</th>
        <th>所属部门</th>
        <th>头像</th>        
        <th>出生日期</th>
        <th>入职时间</th>
        <th>相关操作</th>
   
    <tr>
        <td style="text-align: center;"><?php echo $ID ?></td>
        <td style="text-align: center;"><?php echo $name ?></td>
        <td style="text-align: center;"><?php echo $department ?></td>
        <td style="text-align: center;"><img src="<?php echo $imgurl ?>"></td>
        <td style="text-align: center;"><?php echo $birth ?></td>
        <td style="text-align: center;"><?php echo $entry ?></td>
        <td style="text-align: center;"><a href="#" style="text-decoration: none;" >编辑</a>&nbsp;<a href="#" style="text-decoration: none;">删除</a></td>
    </tr>
 <?php
                    }
                    mysql_close();
                ?>

</table>
</form>


</body>
</html>

